﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SocketChat.Client
{
    public partial class Login : Form
    {
        public Login() {
            InitializeComponent();
            this.DialogResult = DialogResult.No;
        }

        private void btnOK_Click(object sender, EventArgs e) {
            if (string.IsNullOrEmpty(this.txtName.Text.Trim())) {
                this.epTxtName.SetError(this.txtName, "请输入名称!");
                return;
            }
            Program.Name = this.txtName.Text.Trim();
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
